import groovy.xml.MarkupBuilder
import viewbuilder.decoratorexample.HomePage

def writer = new StringWriter()
def builder = new MarkupBuilder(writer)

new HomePage(builder:builder).render([1,2,3,4])

println writer